Due to restrictions on the physical conditions, compared with the wired link, the wireless link in the mobile communication system has a lower transmission rate and a relatively higher bit error rate. In order to effectively use the limited wireless channel bandwidth resources, the Robust Header Compression (ROHC) technique is introduced. The core of the ROHC is to use the information redundancy between the service flow packets to transparently compress and decompress the information in the packet header between the directly connected nodes.
Currently, the ROHC supports the compression and decompression of the Internet Protocol (IP)/User Datagram Protocol (UDP)/Real-time Transport Protocol (RTP), the IP/UDP, and the IP/Encapsulation Security Protocol (ESP) data packets. Both the RTP header and the ESP header have the Serial Number (SN) field, and therefore, after both types of packets are compressed, the compressed packets include the serial number information. After the decompressor decompresses the packets, it sends a feedback to the compressor as desired, and an important field for identifying the feedback is the SN. The compressor will performing sliding based on the window of the Window based LSB Encoding (WLSB) method and the window of the translation table according to the SN. In addition, when the decompressor decompresses a packet, a plurality of fields, for example, the IP packet identifier (IP-ID), can be recovered according to the value of the SN in the compressed packet, and these fields are no longer transmitted in the compressed packet, so as to improve the compression efficiency.
It can be seen from the above description that, the SN plays an important role in the entire compression and decompression procedure. However, there is no SN field in the UDP header, but the SN is necessary in the actual compression and decompression, and therefore, the protocol specifies that if it is a UDP packet, the compressor should randomly generate one SN during the initiation, and the SN value of each subsequent packet is incremented by 1, so that a UDP packet has one SN for use in the compression and decompression procedure.
In the case that the Internet Protocol (IP) type is the IP version 4 (IPv4), when the UDP packet is compressed, the R-1 type packet format defined in the protocol can be used, referred to FIG. 1, wherein the R-1 type packet format defined in the protocol has a 6-bit SN field, and each of the extension 0, the extension 1 and the extension 2 contains a 3-bit SN field. The IP header has the IP identifier (IP-ID) field. The difference between the IP-ID field and the SN should be calculated in the compression, the difference value (IP-ID_offset) between the IP-ID and the SN is encoded with the WLSB method, and the encoded value is included in the compressed packet to be transmitted to the decompressor. The decompressor can obtain the original IP-ID by summing the recovered original SN and the Least Significant Bit (LSB) decoded IP-ID_offset. The R-1 type packet format is used in the R mode, and the R mode refers to the bidirectional reliable mode.
The main idea of the Least Significant Bits encoding method is to compare the value V to be encoded and the reference value (the previous value to be encoded) Vref, and since the difference of these two values is insignificant, the lower k different bits are taken as the encoded values; during the decoding, the k-bit data are used to replace the lower k bits of the reference value so that the original value V can be recovered.
Considering that the wireless link might loss packets, the reference values used by the compressor and decompressor might be inconsistent, and therefore, the compressor establishes a window and place the used reference into the window, and when it needs to use the LSB encoding, the maximum and minimum values are found out from the window and are respectively LSB encoded, and then the acquired k are compared and the value of the larger k is taken as the final encoding result. Therefore, even if the packet is lost due to the instable link, the decompressor can also recover the original values from the compressed fields with the LSB decoding method, thus increasing the robustness of the compression and decompression. When there is a new value to be added to the window while the window is full, the oldest reference value is discarded; or when the acknowledgement of the decompressor is received, all the reference values before the acknowledged one are all cleared, so that the window is slid forward. This is the window based LSB encoding.